package cn.iocoder.yudao.module.wrdk.dal.mysql.land;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.wrdk.dal.dataobject.land.wrdklandDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.wrdk.controller.admin.land.vo.*;

/**
 * 污染地块安全利用率调查 Mapper
 *
 * @author admin
 */
@Mapper
public interface wrdklandMapper extends BaseMapperX<wrdklandDO> {

    default PageResult<wrdklandDO> selectPage(wrdklandPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<wrdklandDO>()
                .eqIfPresent(wrdklandDO::getUserid, reqVO.getUserid())
                .likeIfPresent(wrdklandDO::getUsername, reqVO.getUsername())
                .eqIfPresent(wrdklandDO::getWrdkbm, reqVO.getWrdkbm())
                .eqIfPresent(wrdklandDO::getWrdkmc, reqVO.getWrdkmc())
                .eqIfPresent(wrdklandDO::getSmc, reqVO.getSmc())
                .eqIfPresent(wrdklandDO::getSfbm, reqVO.getSfbm())
                .eqIfPresent(wrdklandDO::getDsmc, reqVO.getDsmc())
                .eqIfPresent(wrdklandDO::getDsbm, reqVO.getDsbm())
                .eqIfPresent(wrdklandDO::getQxmc, reqVO.getQxmc())
                .eqIfPresent(wrdklandDO::getQxbm, reqVO.getQxbm())
                .eqIfPresent(wrdklandDO::getWrdkbounds, reqVO.getWrdkbounds())
                .eqIfPresent(wrdklandDO::getZbxt, reqVO.getZbxt())
                .eqIfPresent(wrdklandDO::getZxjd, reqVO.getZxjd())
                .eqIfPresent(wrdklandDO::getZxwd, reqVO.getZxwd())
                .eqIfPresent(wrdklandDO::getWrdkwz, reqVO.getWrdkwz())
                .eqIfPresent(wrdklandDO::getWrdkarea, reqVO.getWrdkarea())
                .eqIfPresent(wrdklandDO::getDkzt, reqVO.getDkzt())
                .eqIfPresent(wrdklandDO::getWrdkzbxy, reqVO.getWrdkzbxy())
                .betweenIfPresent(wrdklandDO::getRecordtime, reqVO.getRecordtime())
                .eqIfPresent(wrdklandDO::getCuryear, reqVO.getCuryear())
                .eqIfPresent(wrdklandDO::getStatus, reqVO.getStatus())
                .eqIfPresent(wrdklandDO::getQyid, reqVO.getQyid())
                .eqIfPresent(wrdklandDO::getNote, reqVO.getNote())
                .eqIfPresent(wrdklandDO::getReusearea, reqVO.getReusearea())
                .eqIfPresent(wrdklandDO::getJzdzb, reqVO.getJzdzb())
                .eqIfPresent(wrdklandDO::getSaveflag, reqVO.getSaveflag())
                .eqIfPresent(wrdklandDO::getSavesign, reqVO.getSavesign())
                .eqIfPresent(wrdklandDO::getState, reqVO.getState())
                .betweenIfPresent(wrdklandDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(wrdklandDO::getId));
    }

    default List<wrdklandDO> selectList(wrdklandExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<wrdklandDO>()
                .eqIfPresent(wrdklandDO::getUserid, reqVO.getUserid())
                .likeIfPresent(wrdklandDO::getUsername, reqVO.getUsername())
                .eqIfPresent(wrdklandDO::getWrdkbm, reqVO.getWrdkbm())
                .eqIfPresent(wrdklandDO::getWrdkmc, reqVO.getWrdkmc())
                .eqIfPresent(wrdklandDO::getSmc, reqVO.getSmc())
                .eqIfPresent(wrdklandDO::getSfbm, reqVO.getSfbm())
                .eqIfPresent(wrdklandDO::getDsmc, reqVO.getDsmc())
                .eqIfPresent(wrdklandDO::getDsbm, reqVO.getDsbm())
                .eqIfPresent(wrdklandDO::getQxmc, reqVO.getQxmc())
                .eqIfPresent(wrdklandDO::getQxbm, reqVO.getQxbm())
                .eqIfPresent(wrdklandDO::getWrdkbounds, reqVO.getWrdkbounds())
                .eqIfPresent(wrdklandDO::getZbxt, reqVO.getZbxt())
                .eqIfPresent(wrdklandDO::getZxjd, reqVO.getZxjd())
                .eqIfPresent(wrdklandDO::getZxwd, reqVO.getZxwd())
                .eqIfPresent(wrdklandDO::getWrdkwz, reqVO.getWrdkwz())
                .eqIfPresent(wrdklandDO::getWrdkarea, reqVO.getWrdkarea())
                .eqIfPresent(wrdklandDO::getDkzt, reqVO.getDkzt())
                .eqIfPresent(wrdklandDO::getWrdkzbxy, reqVO.getWrdkzbxy())
                .betweenIfPresent(wrdklandDO::getRecordtime, reqVO.getRecordtime())
                .eqIfPresent(wrdklandDO::getCuryear, reqVO.getCuryear())
                .eqIfPresent(wrdklandDO::getStatus, reqVO.getStatus())
                .eqIfPresent(wrdklandDO::getQyid, reqVO.getQyid())
                .eqIfPresent(wrdklandDO::getNote, reqVO.getNote())
                .eqIfPresent(wrdklandDO::getReusearea, reqVO.getReusearea())
                .eqIfPresent(wrdklandDO::getJzdzb, reqVO.getJzdzb())
                .eqIfPresent(wrdklandDO::getSaveflag, reqVO.getSaveflag())
                .eqIfPresent(wrdklandDO::getSavesign, reqVO.getSavesign())
                .eqIfPresent(wrdklandDO::getState, reqVO.getState())
                .betweenIfPresent(wrdklandDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(wrdklandDO::getId));
    }

}
